#include <iostream>
#include "hook.h"
#include "iomanager.h"
#include "demo08.h"
#include "scheduler.h"
#include "fiber.h"
#include "timer.h"
#include "fd_manager.h"

void test_sleep(){
    IOManager iom(1);

    iom.schedule([](){
        sleep(2);
        std::cout << "sleep 2" << std::endl;
    });

    iom.schedule([](){
        sleep(3);
        std::cout << "sleep 3" << std::endl;
    });

    std::cout << "test sleep"  << std::endl;

}

int main(int argc, char** argv){

    test_sleep();
    return 0;
}

